home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1989 September / 1989-09.d64 / rescue pod (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  53 lines

  1. 10 rem *** rescue pod main program ****
  2. 20 :
  3. 30 rem ***** game initialization ******
  4. 40 :
  5. 50 print"[147]"chr$(8)chr$(142)
  6. 60 gosub450:fortt=1to2500:next
  7. 70 s$="               z                             z              z          "
  8. 80 fori=25076to25081step2:pokei,71:pokei+1,80:next
  9. 90 print"[147]":poke53272,27:sc=0:yy=0:re=0
  10. 100 fori=1to22:r=int(rnd(0)*30)+1:poke646,int(rnd(1)*3)+4:printmid$(s$,r,40);
  11. 110 next:print"     z       [159]z      [144]-.-.-.-.-.-.-.-.-.-.";
  12. 120 print"[149]>>==<<;;::;:;<=>=<[129];:::;[149];:;<;:;::;:;:;;:";:(NULL)(NULL)
  13. 130 poke2023,58:poke56295,9:poke716,3:poke726,0:(NULL)4,0:(NULL)(NULL)
  14. 140 :
  15. 150 rem ****** main program loop ******
  16. 160 :
  17. 170 x=peek(700):y=peek(708):z=peek(716)
  18. 180 ifpeek(726)thenpoke726,0:gosub300:goto170
  19. 190 ifyy>225andy<55andre=1thensc=sc+10:(NULL)3:(NULL)0,-1:(NULL)0,0:gosub300
  20. 200 ifz=1thenprint"[158]"1"[151]&0] ";:goto220
  21. 210 print"[158]"z"[151]&0](";
  22. 220 ifsc>hsthenhs=sc
  23. 230 print"   (\0'^[158]"sc"[151] !1_! (\0'^[158]"hs:ifz=0then350
  24. 240 ify<229orre=1orx<78orx>85then170
  25. 250 (NULL)(NULL):(NULL)4:(NULL)0:fori=56255to56235step-1:pokei,10:forj=1to100
  26. 260 next:pokei,0:(NULL)5:next:yy=y:re=1:(NULL)(NULL):goto170
  27. 270 :
  28. 280 rem *** random movement routine ***
  29. 290 :
  30. 300 fori=1to7:m=int(rnd(1)*8)+1:ifm>4thenm=-(9-m)
  31. 310 (NULL)i,m:next:yy=0:re=0:return
  32. 320 :
  33. 330 rem ***** end of game routine *****
  34. 340 :
  35. 350 (NULL)(NULL):(NULL)0:d$="":fori=1to11:d$=d$+"":next:fori=1to15:d$=d$+""
  36. 360 next:(NULL)4,1:printd$"[157][157][157][157]&#[* [_[1%? [158]+[159]*/%[158],"
  37. 370 printd$"[158]_[$^ 0)^'":fortd=0to50:next:printd$"_[$^ 0)^'":fortd=0to50:next
  38. 380 geta$:ifa$=""then370
  39. 390 ifa$="y"thengoto90
  40. 400 ifa$<>"n"then370
  41. 410 (NULL):(NULL):print"[147]":sys64738
  42. 420 :
  43. 430 rem **** introduction routine *****
  44. 440 :
  45. 450 printtab(14)"[150]rescue pod"
  46. 460 print"[159]maneuver your rescue pods to the surface";
  47. 470 print"of the small planetoid and back up while";
  48. 480 print"avoiding the treacherous asteroids.  but";
  49. 490 print"be careful,  you only have 3 pods at the";
  50. 500 print"beginning of your rescue attempts.   use";
  51. 510 print"a joystick plugged into port number two."
  52. 520 printtab(14)"good luck!":return
  53.